<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib uri="http://www.framework.com/taglib/tree" prefix="tree"%>
<form name="addDataForm" id="addDictDataForm" method="post" action="${ctx}/framework/dict/save">
	<input type="hidden" name="id" value="${dict.id}"/>
	<input type="hidden" name="createTime" value="<fmt:formatDate value='${dict.createTime}' pattern='yyyy-MM-dd HH:mm:ss'/>"/>
	<input type="hidden" name="createrId" value="${dict.createrId}"/>
	<input type="hidden" name="createrName" value="${dict.createrName}"/>
	<table class="infoTable">
		<tbody>
		<tr>
			<th align="right" width="10%">数据字典名称</th>
			<td><input name="name" class="easyui-validatebox" size="30" value="${dict.name}" data-options="required:true" maxlength="50"/>
			</td>
			<th align="right" width="10%">上级节点</th>
			<td><input name="pName" class="easyui-validatebox" readonly="readonly" id="pName" size="30" value="${dict.pName}" data-options="required:true" maxlength="50"/>
			<input type="hidden" name="pid" id="dictPid" class="easyui-validatebox" size="30" value="${dict.pid}" data-options="required:true" maxlength="50"/>
			<span id="pModel" style="width: 100px;height: 100px;"><a href="javascript:void(0);" onclick="selectParentDict()"><img src="${ctx}/commons/themes/icons/icon5.png" border="0" title="上级部门"/></a></span>
			</td>
		</tr>
		<tr>
			<th align="right" width="10%">值</th>
			<td><input name="value" class="easyui-validatebox" size="20" value="${dict.value}" maxlength="50"/>
			</td>
			<th align="right" width="10%">排序值</th>
			<td><input name="disSort" class="easyui-validatebox" size="20" value="${dict.disSort}" data-options="validType:['number']" maxlength="11"/>
			</td>
		</tr>
		<tr>
			<th align="right" width="10%">字典说明</th>
			<td colspan="3">
				<textarea rows="3" style="width: 580px;" id="remark" name="remark" onkeyup="checkLength('remarkError',50,'remark')">${dict.remark}</textarea>
				<font color="red"><br />注：50个字符以内，还可以输入<span class="input_font" id="remarkError">50</span>个字符</font>
			</td>
		</tr>
		</tbody>
	</table>
	<tree:dictTree ctx="${ctx}" dictIds="dictPid" dictNames="pName" selectMethod="single" />
</form>
<script type="text/javascript">
	function selectParentDict(){
		seldictPidDictTree($('#dictPid').val());
		$('#dictPidDictTreeDialog').dialog('open');
	}
</script>
